<template>
    <div class="list-info-item clearfix coupon-select text-normal clearfix" style="padding: 30rpx 20rpx 30rpx 30rpx;" @click="onClick">
        <template v-if="showArrow">
            <div class="fl" style="width: 94%;display:flex;">
                <div class="fl_titl">
                    规格
                </div>
                <div class="fl_con">
                    {{label}}
                </div>
            </div>
            <!-- <div class="fl">{{label}}</div> -->
            <div class="fr grey-text-color">
                <span>{{text}}</span>
                <span v-if="showArrow" class="icon">&#xe770;</span>
            </div>
        </template>
        <template v-else>
            <!-- <div class="fl" style="width: 94%;display:flex;">
                <div class="fl_titl">
                    规格
                </div>
                <div class="fl_con">
                    {{label}}
                </div>
            </div> -->
            <div class="fl">{{label}}</div>
            <div class="fr grey-text-color">
                <span>{{text}}</span>
                <span v-if="showArrow" class="icon">&#xe770;</span>
            </div>
        </template>
    </div>
</template>

<script>
export default {
    name: 'ListInfoItem',
    props: {
        /** 左侧内容 */
        label: {
            type: String,
        },
        text: {
            type: String,
        },
        showArrow: {
            type: Boolean,
            default: true,
        },
    },
    methods: {
        onClick() {
            this.$emit('click');
        },
    },
};
</script>

<style lang="less">
@import "../../lib/style/mixins.less";

.list-info-item {
    padding: 30rpx;
    background-color: #ffffff;

    .fl_titl{
        padding: 2rpx 20rpx 2rpx 15rpx;
        display: inline-block;
        margin-right: 15rpx;
        border: none;
        line-height: 36rpx;
        color: #000;
        font-size: 28rpx;
        font-weight: bold;
    }
    .fl_con{
        // width: 85%;
        width: 82%;
        border-bottom: 0.5px dashed #ddd;
        font-size: 12px;
    }
    .icon {
        font-size: 18px;
    }
}
</style>
